//
//  UIButton+Extension.m
//  Mtime2.0
//
//  Created by 凉气的Mac on 16/9/23.
//  Copyright © 2016年 凉气的Mac. All rights reserved.
//

#import "UIButton+Extension.h"

@implementation UIButton (Extension)

+(instancetype)creatWithTitle:(NSString *)title color:(UIColor *)color fontSize:(CGFloat)fontSize{

    UIButton *button = [[UIButton alloc]init];

    [button setTitle:title forState:UIControlStateNormal];
    
    [button setTitleColor:color forState:UIControlStateNormal];
    
    button.titleLabel.font = [UIFont systemFontOfSize:fontSize];
    
    return button;
}

@end

@implementation UILabel (Extension)

+(instancetype)creatWithTitle:(NSString *)title color:(UIColor *)color fontSize:(CGFloat)fontSize{

    UILabel *label = [[UILabel alloc]init];
    
    label.text = title;
    
    label.textColor = color;
    
    label.font = [UIFont systemFontOfSize:fontSize];

    return label;
}

@end

